perm filename LIBRAR.LSP[W78,JMC] blob sn#345040 filedate 1978-03-30 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	(defun genlis (gen fn x) (cond ((null x) nil)
C00003 ENDMK
CāŠ—;
(defun genlis (gen fn x) (cond ((null x) nil)
(t ((lambda (z) (cons (fn (car z)) (genlis gen fn (cdr z)))) (gen x)))))

(defun genapp (gen fn x) (cond ((null x) nil)
(t ((lambda (z) (append (fn (car z)) (genlis gen fn (cdr z)))) (gen x)))))

(defun genfind (gen pred x) (cond ((null x) nil)
(t ((lambda (z) (cond ((null z) nil) ((pred (car z)) z) (t (genfind gen
pred (cdr z))))) (gen x)))))

(comment '(but what about objects that are accepted or rejected by
components, e.g. when a component is rejected any object with that
component in that position with that existing match is rejected))